package com.lingchen.boot.gof.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * Created by lc on 2020/6/22
 */
public class ApplicationEvenListener implements ApplicationListener<ContextRefreshedEvent> {
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        System.out.println("执行了");
        ApplicationContext act = event.getApplicationContext();
        System.out.println("容器初始化完成！");
    }
}
